﻿using CPPEI.BD.Contract;
using CPPEI.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.BD.Agent
{
    public class ResponseHandlerFactory : IResponseHandlerFactory
    {
        public IResponseHandler Create(byte command)
        {
            if (command == NETCMD.RunDisplay)
            {
                return new RespRunDisplayHandler();
            }
            else if (command == NETCMD.RunVMTool)
            {
                return new RespRunVMToolHandler();
            }
            else if (command == NETCMD.ForwardVMPackage)
            {
                return new ForwardVMPackageHandler();
            }
            return null;
        }
    }
}
